package com.itheima.d7_IO.PrintStream;

import java.io.FileNotFoundException;
import java.io.PrintStream;

public class PrintDemo1 {
    public static void main(String[] args) throws Exception {
        // 创建管道 printStream
        PrintStream printStream = new PrintStream("E:\\Empty\\file1.txt");
        printStream.println("打印流");
        System.out.println("123");
        System.setOut(printStream);
        System.out.println("TTT");
        printStream.close();
    }
}
